Quickstart: Tabular Classification with the command line interface
-------------------------------------------------------------------

NeurEco executable for Tabular models (Regression, Compression, Classification) is called NeurEcoDNN. It can be called directly from a terminal / powershell after a full installation of NeurEco.

To build a NeurEco Regression model, run the following command in the terminal:

.. code-block:: shell

    neurecoDNN build path/to/build/configuration/file/build.conf

The skeleton of a configuration file required to build NeurEco Regression model, here build.conf, looks as follows (for the test case :std:ref:`RNA in quickstart`).
Its fields should be filled according to the problem at hand.

.. code-block:: javascript

	{
    "neurecoDNN_build": {
        "DevSettings": {
            "disconnect_inputs_if_possible": true,
            "final_learning": true,
            "initial_beta_reg": 0.1,
            "parameter_number_limit": 0,
            "valid_percentage": 33.33
        },
        "UserSettings": {
            "gpu_id": 0,
            "use_gpu": false
        },
        "build_compress": false,
        "checkpoint_address": "./GeneExpressionCancerRnaSeq/GeneExpressionCancerRnaSeq.checkpoint",
        "classification": true,
        "exc_filenames": [
            "x_train_0_.csv",
            "x_train_1_.csv"
        ],
        "freeze_structure": false,
        "input_normalization": {
            "normalize_per_feature": true,
            "scale_type": "auto",
            "shift_type": "auto"
        },
        "model_output_format": "csv",
        "output_filenames": [
            "y_train_0_.csv",
            "y_train_1_.csv"
        ],
        "output_normalization": {
            "normalize_per_feature": false,
            "scale_type": "none",
            "shift_type": "none"
        },
        "resume": false,
        "starting_from_checkpoint_address": "",
        "starting_from_model_id": -1,
        "test_exc_filenames": [
            "x_test.csv"
        ],
        "test_output_filenames": [
            ".y_test.csv"
        ],
        "write_model_to": "./GeneExpressionCancerRnaSeq/GeneExpressionCancerRnaSeq.ednn"
    	}
	}

.. note:: 
    For detailed documentation on **build**, see :std:ref:`Build NeurEco Classification model with the command line interface`. For data preparation, see :std:ref:`Data preparation for NeurEco Classification conf`.

To perform an evaluation, run the following command in the terminal:

.. code-block:: shell

    neurecoDNN evaluate path/to/evaluation/configuration/file/eval.conf
	
The skeleton of an evaluation configuration file, here eval.conf, looks as follows (for the test case :std:ref:`RNA in quickstart`).
Its fields should be filled according to the problem at hand.

.. code-block:: javascript

   {
    "NeurEcoEvaluate": {
        "exc_filenames": [
            "x_test.csv"
        ],
        "model_output_format": "csv",
        "neureco_filename": "GeneExpressionCancerRnaSeq/GeneExpressionCancerRnaSeq.ednn",
        "optional_output_reference": [
            "y_test.csv"
        ],
        "write_model_output_to_directory": "GeneExpressionCancerRnaSeq/EvaluationResults"
    	}
	}

.. note::
    For detailed documentation on **evaluate**, see :std:ref:`Evaluate NeurEco Classification model with the command line interface`

To export the model to the chosen format, run one of the following commands:

.. code-block:: shell
    
    neurecoDNN exportC ./GeneExpressionCancerRnaSeq/GeneExpressionCancerRnaSeq.ednn ./GeneExpressionCancerRnaSeqModel/GeneExpressionCancerRnaSeq.h double
    neurecoDNN exportONNX ./GeneExpressionCancerRnaSeq/GeneExpressionCancerRnaSeq.ednn ./GeneExpressionCancerRnaSeqModel/GeneExpressionCancerRnaSeq.onnx float16
    neurecoDNN exportVBA ./GeneExpressionCancerRnaSeq/GeneExpressionCancerRnaSeq.ednn ./GeneExpressionCancerRnaSeqModel/GeneExpressionCancerRnaSeq.onnx float
    neurecoDNN exportFMU ./GeneExpressionCancerRnaSeq/GeneExpressionCancerRnaSeq.ednn ./GeneExpressionCancerRnaSeqModel/GeneExpressionCancerRnaSeq.fmu

Export to these formats requires *embed* license.

.. note::
    For detailed documentation on Tabular Classification with the command line interface, see :std:ref:`Tabular Classification with a configuration file`.